package adapters

import (
	"time"
)

type ProductMemoryModel struct {
	Id          int       `comment:"唯一标识"`
	Name        string    `comment:"名称"`
	Price       float32   `comment:"价格"`
	Stock       int       `comment:"库存"`
	Description string    `comment:"描述"`
	Image       string    `comment:"商品图片"`
	CreateTime  time.Time `comment:"创建时间"`
	UpdateTime  time.Time `comment:"修改时间"`
	DeleteTime  time.Time `comment:"删除时间"`
}

func (p ProductMemoryModel) IsDelete() bool {
	return p.DeleteTime != time.Time{}
}
